package string;

public class SubstringDemo {
    public static void main(String[] args) {
        String str="www.tengzhou.cn";
        int start=str.indexOf(".")+1;//int start=4;
        int end=str.indexOf(".",start);   //int end=12;
        String name=str.substring(start,end);
        System.out.println(name);
    }
}
